DISCUSSION
A call to the function
MPAllocateTaskStorageIndex
returns an index number that is common across all tasks in the current process. You can use this index number in calls to
MPSetTaskStorageValue
and
MPGetTaskStorageValue
to set a different value for each task using the same index.
You can think of the task storage area as a two dimensional array cross-referenced by the task storage index number and the task ID. Note that since the amount of per-task storage is determined when the task is created, the number of possible index values associated with a task is limited.